package com.paiai.lslease.service.apphouse;

import com.paiai.lslease.auto.model.AppFurniture;
import com.paiai.lslease.auto.model.AppHouse;
import com.paiai.lslease.auto.model.AppLock;
import com.paiai.lslease.auto.model.AppPic;
import com.paiai.lslease.model.AppHouseInfo;
import com.paiai.lslease.model.AppHouseInfoLandlordQuery;

import java.io.File;
import java.util.List;

public interface AppHouseService {

    /**
     * 添加房源
     */
    AppHouseInfo insertAppHouseInfo(AppHouse appHouse) throws Exception;

    /**
     * 修改房源基本信息
     */
    AppHouseInfo modifyAppHouseBaseInfo(int houseId, AppHouse appHouse) throws Exception;

    /**
     * 修改房源家具信息
     */
    AppHouseInfo modifyAppHouseFurnitureInfo(int houseId, AppFurniture appFurniture) throws Exception;

    /**
     * 修改房源图片信息
     */
    AppHouseInfo modifyAppHousePicInfo(int houseId, File housePic, String housePicFileName, String housePicContentType, int housePicIndex) throws Exception;

    /**
     * 获取单个房源信息
     */
    AppHouseInfo getAppHouseInfo(int houseId) throws Exception;

    /**
     * 获取房源信息列表
     */
    List getApphouseInfoList(int userId) throws Exception;

    /**
     * 获取房源家具信息
     */
    AppFurniture getAppFurniture(int houseId) throws Exception;

    /**
     * 获取房源图片信息
     */
    AppPic getAppPic(int houseId) throws Exception;

    /**
     * 根据房源ID获取基本的房源信息
     */
    AppHouse getAppHouseById(int houseId) throws Exception;

    /**
     * 房东删除房源
     */
    boolean deleteAppHouseById(int houseId) throws Exception;

    /**
     * 检测房源信息是否存在
     */
    boolean checkHouseExist(int houseId) throws Exception;

    /**
     * 检测房源是否属于该用户
     */
    boolean houseBelongUser(int houseId, int userId) throws Exception;

    /**
     * 查询简单的房源列表
     */
    List<AppHouse> selectSimpleHouseList(int userId) throws Exception;

    /**
     * 查询房源下的所有设备
     */
    List<AppLock> selectAppLockListByHouseId(int houseId) throws Exception;
}
